#include <iostream>
#include <string>
#include <Windows.h>

using namespace std;

int main()
{
    SetConsoleCP(1251);
    setlocale(0, "ru");
    string line, word = "";
    getline(cin, line);
    line += ' ';
    int wordsCount = 0;
   
    for (char ch : line)
    {
        if (ch == ' ')
        {
            wordsCount++;
            word.clear();
       
            word += ch;
            if (ch >= 'a' && ch <= 'z')
            cout << "Кол-во слов:" << wordsCount << "\n";
        }
    }
    cout << "Кол-во слов:" << wordsCount << "\n";
    for (char ch : line)
    {
        if (ch == ' ')
        {
            wordsCount++;
            cout << word << " Букв: " << word.length() << " " <<"\n";
            word.clear();
            
        }
        
    }
}
